Repository navigation
fix: update dprint-core to 0.75.2 and add code examples to the config schema - #37
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates dprint-core to 0.75.2, which has printer performance fixes and no API changes, and dprint-development to 0.12.1. With 0.12, the spec test callback gets the range to format, which is passed on to
format_text_rangesince the plugin formats ranges (#36).Documentation in the schema
Improves the configuration documentation that dprint.dev renders from
schema.json, like dprint/dprint-plugin-typescript#898 and dprint/dprint-plugin-typescript#899:x-exampleonindentStyle,quoteStyle,skipMagicTrailingComma,docstringCodeFormat,nestedStringQuoteStyleandpreview: input code that's formatted with each of the property's values. The repo'sschema.jsononly has the inputs. The outputs are generated with the built plugin when the schema is published.x-sectionsat the root: the properties grouped into five sections (General, Strings and commas, Docstrings, Python version and preview, Lint fixes).x-playgroundat the root: unformatted Python that the dprint.dev playground starts with when this plugin is selected.No property overrides another, so there's no
x-overrides.Also describes the values of
nestedStringQuoteStyleanddocstringCodeLineWidth, uses code spans in descriptions, and usesintegerwith a minimum (and a maximum of 255 forindentWidthand 65535 forlineLength) for the numeric properties.CI
The new "Generate config schema" step runs the
publish-schematask from dprint/automation on the built wasm plugin, before the schema is uploaded to a release. It adds the example outputs, and fails when the plugin has a diagnostic for a property's default, an example formats the same with every value, a top level property isn't in exactly one section, or the playground sample doesn't format or is already formatted.To see the generated schema locally: